// dlg.txt

begintalkscript;

variables;

	
begintalknode 1;
	state = -1;
	nextstate = -1;	
	condition = get_sdf(13,1) == 0;
	question = "special";
	text1 = "You walk into the Mera Fen, the huge expanse of marshland that dominates the center of the Mera-Tev.";
	text2 = "In normal times, swampland has considerable value. As wet and miserable as a fen can be, swamps are an excellent source of the herbs and goo that Shapers use for their work.";
	text3 = "However, the Mera Fen seems to have been largely abandoned by humanity. The roads are overgrown. There are no signs of inhabitants or merchants. Instead, you see the signs of war.";
	text4 = "The ground is scorched. The smell of rot and sulfur is in the air. And there is a constant, oppressive feeling. You sense the constant presence of a powerful, hostile magic. Something has claimed this land.";
	text5 = "To keep the danger at bay, the Shapers have created networks of mines and traps, hoping to keep the darkness back. Someone recently detonated the mines on this road. They have not yet been replaced.";
	action = SET_SDF 13 1 1;
	
begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(19,4) == 0;
	question = "special";
	text1 = "You are at the north end of a bandit camp, well hidden in the Mera Fen. They took over the ruins of an old settlement. The wooden walls of the buildings are rapidly decaying, crumbling under the onslaught of moss and moisture.";
	text2 = "Unlike the bandits to the north, this band is not going to negotiate with you. As soon as you emerge, a guard on the far end of the footbridge shouts, _Shapers! Shaper attack!_";
	text3 = "You aren't really a Shaper, but you won't really have time to explain that. They prepare to fight you off.";
	action = SET_SDF 19 4 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(19,5) == 0;
	question = "special";
	text1 = "There are two artila lurking by the nest to the north. They are large, fat, lazy creatures. They can barely move. (Though they can, sadly, still spit.)";
	text2 = "Their pink, moist flanks bulge and quiver ominously. It's as if there are other, smaller creatures inside, struggling to get out.";
	action = SET_SDF 19 5 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(19,7) == 0;
	question = "special";
	text1 = "There is an instant change in the air. A magic charge. Your skin tingles. The air seems to grow darker.";
	text2 = "Your altered senses immediately pick it up. Something has entered the region somewhere to the southeast. Something enormously powerful. Something is out hunting.";
	action = SET_SDF 19 7 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = gf(19,3) == 0 && gf(19,2) > 0;
	question = "special";
	text1 = "Remembering what you learned in the bandit camp to the north, you keep a careful eye on the underbrush along this path.";
	text2 = "Eventually, you see what you are looking for. A narrow path, very well concealed, though a thicket of nettles. If you hadn't known what to look for, you would have walked right by it.";
	code =
		sf(19,3,1);
		set_terrain(11,19,0);
		set_terrain(12,19,0);
		set_terrain(11,20,0);
		set_terrain(12,20,0);
	break;
	
begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = gf(19,8) == 0;
	question = "special";
	text1 = "As you fight your way into the camp, you get a closer look at the crumbling buildings to the south. There are two large structures. The one to the east is still standing. The one to the west has mostly collapsed and is being used to house creations.";
	text2 = "You see a man in a steel breastplate standing by the entrance to the eastern building. He drops his arm and shouts, _Release the roamers!_ Then he retreats inside.";
	text3 = "Roamers begin to run out of the stables. They are strange creatures. Their skin glows slightly, and rain hisses and steams when it strikes them.";
	text4 = "They look like unstable roamers. The sort that explode when they die, harming all nearby. And they're running straight at you."; 
	action = SET_SDF 19 8 1;
	code =
		set_attitude(1002,10);
		set_act_at_dist(1002,1);
		set_attitude(40,10);
		set_act_at_dist(40,1);
		set_attitude(41,10);
		set_act_at_dist(41,1);
	break;
	
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";
	
begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You have trapped the leader of these bandits in his chambers. He cuts an impressive figure with his steel armor and large broadsword. He looks completely terrified.";
	text2 = "He points his sword at you with a shaking hand and says, _You are fools! You try to destroy Crenshaw? You know ... know what will happen, don't you? I'm a friend of Bennhold. You hurt me, and he ... he'll be sure to hunt you down!_";
	text3 = "_But I'm merciful. I'll make you an offer. There is a way you can survive!_";
	code =
		sf(19,1,1);
	break;
	
begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Bennhold? Who is that?";
	text1 = "_The master of the bandits? The king of rogues? You've never heard of him?_";
	text2 = "_Even the Shapers fear him. He said I could have this swamp. It's mine! You're making a big, big mistake!_ You wonder if Crenshaw ever even met Bennhold or was just using his name to extort the other bandits.";

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "You mean Bennhold isn't here? Then I have no reason to fear killing you. (Attack.)";
	text1 = "_No! I know Bennhold! He was here! He went to the Storm Plains, but he will be back! And when he does, he ... he ... Hey! What are you doing? Aaaahhhh!_";
	action = END_TALK;

begintalknode 13;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "All right. What is your offer?";
	text1 = "_Bennhold was here. He really was. And he left for the Storm Plains. But he will be back. When he does, he will hunt down and kill those who hurt his servants._";
	text2 = "_But if you let me go, I'll make sure he spares you. I give you my word. You won't have to live the rest of your life in fear! This is very generous!_";
	text3 = "_What do you say?_ He waits for a response. His lip quivers a little.";

begintalknode 14;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Hmmm. Think I'll just kill you.";
	text1 = "_You really should reconsider! This is your last hope. You are dooming yourself to a life of fear! Bennhold will find you, and when he does, he ... he ... Hey! What are you doing? Aaaahhhh!_";
	action = END_TALK;

begintalknode 15;
	state = 11;
	nextstate = -1;
	condition = get_stat(20) > 4;
	question = "All right. I'll let you go. If you give me your sword. It looks nice.";
	text1 = "Crenshaw looks forlorn. He is very attached to his weapon. And yet, he is also fond of being alive. He holds it out to you, pommel first.";
	text2 = "As you reach for it, he tosses it at you. As you catch it, he runs out the door. His surprised henchlings are as stunned by this bit of cowardice as you are.";
	action = END_TALK;
	code =
		erase_char(54);
		sf(19,9,1);
		award_party_xp(100,6);
		reward_give(72);
	break;
	
begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "All right. I'll let you go. And don't come back.";
	text1 = "Crenshaw and his henchlings do not hesitate to take advantage of this opportunity. They do, after all, want to survive.";
	text2 = "They flee the building, running for safety as fast as they can.";
	action = END_TALK;
	code =
		erase_char(1003);
		sf(19,9,1);
	break;

	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		